package com.healthcloud.service;

import com.healthcloud.entity.BusRentEntity;
import com.healthcloud.entity.BusRentEntityVo;
import com.healthcloud.utils.PageParam;

import java.util.List;
import java.util.Map;

public interface BusRentService {
	List<BusRentEntity> search(BusRentEntity entity, PageParam pageParam);

	List<BusRentEntity> queryList(BusRentEntity entity, PageParam pageParam);

    int count(BusRentEntity entity);

    int queryTotal(BusRentEntity entity);
    
    BusRentEntity searchById(Long id);
    
    int createRent(BusRentEntity entity);
    
    int updateBack(BusRentEntity entity);
    
    int updateHistory(BusRentEntity entity);
    
    List<BusRentEntity> searchDue(BusRentEntity entity, PageParam pageParam);
    
    int countDue(BusRentEntity entity);
    
    /**
     * 获取最新的一个租赁记录
     * @param instrumentId
     * @return
     */
	BusRentEntity searchLastByInstrumentId(Long instrumentId);

	/**
	 * 根据医生id获取租赁信息
	 * @param doctorId
	 * @return
	 */
	Map<String, Object> rentCount(Long doctorId);

	/**
	 * 查找医院下租赁用户列表
	 * @param entity
	 * @param pageParam 
	 * @return
	 */
	List<BusRentEntityVo> searchRentUsers(BusRentEntity entity, PageParam pageParam);

	List<BusRentEntity> searchApp(BusRentEntity entity, PageParam pageParam);

	Map countTimes(BusRentEntity entity);
}
